"""
__moveoneoutputlink_MDL.py_____________________________________________________

Automatically generated AToM3 Model File (Do not modify directly)
Author: levi
Modified: Tue Jan  1 17:06:44 2013
_______________________________________________________________________________
"""
from stickylink import *
from widthXfillXdecoration import *
from MT_pre__Station_S import *
from MT_pre__Female_S import *
from MT_pre__directLink_S import *
from MT_post__directLink_S import *
from MT_post__Female_S import *
from MT_post__Station_S import *
from RHS import *
from LHS import *
from graph_LHS import *
from graph_MT_post__directLink_S import *
from graph_MT_pre__Station_S import *
from graph_MT_pre__directLink_S import *
from graph_MT_post__Station_S import *
from graph_RHS import *
from graph_MT_pre__Female_S import *
from graph_MT_post__Female_S import *
from ATOM3Enum import *
from ATOM3String import *
from ATOM3BottomType import *
from ATOM3Constraint import *
from ATOM3Attribute import *
from ATOM3Float import *
from ATOM3List import *
from ATOM3Link import *
from ATOM3Connection import *
from ATOM3Boolean import *
from ATOM3Appearance import *
from ATOM3Text import *
from ATOM3Action import *
from ATOM3Integer import *
from ATOM3Port import *
from ATOM3MSEnum import *

def moveoneoutputlink_MDL(self, rootNode, MT_pre__SimpleDSLTransRootNode=None, MT_post__SimpleDSLTransRootNode=None, MoTifRuleRootNode=None):

    # --- Generating attributes code for ASG MT_pre__SimpleDSLTrans ---
    if( MT_pre__SimpleDSLTransRootNode ): 
        # author
        MT_pre__SimpleDSLTransRootNode.author.setValue('Annonymous')

        # description
        MT_pre__SimpleDSLTransRootNode.description.setValue('\n')
        MT_pre__SimpleDSLTransRootNode.description.setHeight(15)

        # name
        MT_pre__SimpleDSLTransRootNode.name.setValue('')
        MT_pre__SimpleDSLTransRootNode.name.setNone()
    # --- ASG attributes over ---


    # --- Generating attributes code for ASG MT_post__SimpleDSLTrans ---
    if( MT_post__SimpleDSLTransRootNode ): 
        # author
        MT_post__SimpleDSLTransRootNode.author.setValue('Annonymous')

        # description
        MT_post__SimpleDSLTransRootNode.description.setValue('\n')
        MT_post__SimpleDSLTransRootNode.description.setHeight(15)

        # name
        MT_post__SimpleDSLTransRootNode.name.setValue('')
        MT_post__SimpleDSLTransRootNode.name.setNone()
    # --- ASG attributes over ---


    # --- Generating attributes code for ASG MoTifRule ---
    if( MoTifRuleRootNode ): 
        # author
        MoTifRuleRootNode.author.setValue('Annonymous')

        # description
        MoTifRuleRootNode.description.setValue('\n')
        MoTifRuleRootNode.description.setHeight(15)

        # name
        MoTifRuleRootNode.name.setValue('MoveOneOutputLink')
    # --- ASG attributes over ---


    self.obj123=MT_pre__Station_S(self)
    self.obj123.isGraphObjectVisual = True

    if(hasattr(self.obj123, '_setHierarchicalLink')):
      self.obj123._setHierarchicalLink(False)

    # MT_label__
    self.obj123.MT_label__.setValue('1')

    # MT_pivotOut__
    self.obj123.MT_pivotOut__.setValue('station1')

    # MT_subtypeMatching__
    self.obj123.MT_subtypeMatching__.setValue(('True', 0))
    self.obj123.MT_subtypeMatching__.config = 0

    # MT_pre__name
    self.obj123.MT_pre__name.setValue('\n#===============================================================================\n# This code is executed when evaluating if a node shall be matched by this rule.\n# You can access the value of the current node\'s attribute value by: attr_value.\n# You can access any attribute x of this node by: this[\'x\'].\n# If the constraint relies on attribute values from other nodes,\n# use the LHS/NAC constraint instead.\n# The given constraint must evaluate to a boolean expression.\n#===============================================================================\n\nreturn True\n')
    self.obj123.MT_pre__name.setHeight(15)

    # MT_pivotIn__
    self.obj123.MT_pivotIn__.setValue('station1')

    self.obj123.graphClass_= graph_MT_pre__Station_S
    if self.genGraphics:
       new_obj = graph_MT_pre__Station_S(420.0,280.0,self.obj123)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("MT_pre__Station_S", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints 
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj123.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj123)
    self.globalAndLocalPostcondition(self.obj123, rootNode)
    self.obj123.postAction( rootNode.CREATE )

    self.obj124=MT_pre__Station_S(self)
    self.obj124.isGraphObjectVisual = True

    if(hasattr(self.obj124, '_setHierarchicalLink')):
      self.obj124._setHierarchicalLink(False)

    # MT_label__
    self.obj124.MT_label__.setValue('2')

    # MT_pivotOut__
    self.obj124.MT_pivotOut__.setValue('station2')

    # MT_subtypeMatching__
    self.obj124.MT_subtypeMatching__.setValue(('True', 0))
    self.obj124.MT_subtypeMatching__.config = 0

    # MT_pre__name
    self.obj124.MT_pre__name.setValue('\n#===============================================================================\n# This code is executed when evaluating if a node shall be matched by this rule.\n# You can access the value of the current node\'s attribute value by: attr_value.\n# You can access any attribute x of this node by: this[\'x\'].\n# If the constraint relies on attribute values from other nodes,\n# use the LHS/NAC constraint instead.\n# The given constraint must evaluate to a boolean expression.\n#===============================================================================\n\nreturn True\n')
    self.obj124.MT_pre__name.setHeight(15)

    # MT_pivotIn__
    self.obj124.MT_pivotIn__.setValue('station2')

    self.obj124.graphClass_= graph_MT_pre__Station_S
    if self.genGraphics:
       new_obj = graph_MT_pre__Station_S(600.0,280.0,self.obj124)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("MT_pre__Station_S", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints 
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj124.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj124)
    self.globalAndLocalPostcondition(self.obj124, rootNode)
    self.obj124.postAction( rootNode.CREATE )

    self.obj125=MT_pre__Female_S(self)
    self.obj125.isGraphObjectVisual = True

    if(hasattr(self.obj125, '_setHierarchicalLink')):
      self.obj125._setHierarchicalLink(False)

    # MT_label__
    self.obj125.MT_label__.setValue('3')

    # MT_pivotOut__
    self.obj125.MT_pivotOut__.setValue('')
    self.obj125.MT_pivotOut__.setNone()

    # MT_subtypeMatching__
    self.obj125.MT_subtypeMatching__.setValue(('True', 0))
    self.obj125.MT_subtypeMatching__.config = 0

    # MT_pre__name
    self.obj125.MT_pre__name.setValue('\n#===============================================================================\n# This code is executed when evaluating if a node shall be matched by this rule.\n# You can access the value of the current node\'s attribute value by: attr_value.\n# You can access any attribute x of this node by: this[\'x\'].\n# If the constraint relies on attribute values from other nodes,\n# use the LHS/NAC constraint instead.\n# The given constraint must evaluate to a boolean expression.\n#===============================================================================\n\nreturn True\n')
    self.obj125.MT_pre__name.setHeight(15)

    # MT_pivotIn__
    self.obj125.MT_pivotIn__.setValue('')
    self.obj125.MT_pivotIn__.setNone()

    self.obj125.graphClass_= graph_MT_pre__Female_S
    if self.genGraphics:
       new_obj = graph_MT_pre__Female_S(600.0,440.0,self.obj125)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("MT_pre__Female_S", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints 
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj125.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj125)
    self.globalAndLocalPostcondition(self.obj125, rootNode)
    self.obj125.postAction( rootNode.CREATE )

    self.obj15306=MT_pre__directLink_S(self)
    self.obj15306.isGraphObjectVisual = True

    if(hasattr(self.obj15306, '_setHierarchicalLink')):
      self.obj15306._setHierarchicalLink(False)

    # MT_label__
    self.obj15306.MT_label__.setValue('4')

    # MT_pivotOut__
    self.obj15306.MT_pivotOut__.setValue('')
    self.obj15306.MT_pivotOut__.setNone()

    # MT_subtypeMatching__
    self.obj15306.MT_subtypeMatching__.setValue(('True', 0))
    self.obj15306.MT_subtypeMatching__.config = 0

    # MT_pivotIn__
    self.obj15306.MT_pivotIn__.setValue('')
    self.obj15306.MT_pivotIn__.setNone()

    self.obj15306.graphClass_= graph_MT_pre__directLink_S
    if self.genGraphics:
       new_obj = graph_MT_pre__directLink_S(661.0,401.0,self.obj15306)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("MT_pre__directLink_S", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints 
    else: new_obj = None
    self.obj15306.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj15306)
    self.globalAndLocalPostcondition(self.obj15306, rootNode)
    self.obj15306.postAction( rootNode.CREATE )

    self.obj30452=MT_post__directLink_S(self)
    self.obj30452.isGraphObjectVisual = True

    if(hasattr(self.obj30452, '_setHierarchicalLink')):
      self.obj30452._setHierarchicalLink(False)

    # MT_label__
    self.obj30452.MT_label__.setValue('5')

    # MT_pivotOut__
    self.obj30452.MT_pivotOut__.setValue('')
    self.obj30452.MT_pivotOut__.setNone()

    self.obj30452.graphClass_= graph_MT_post__directLink_S
    if self.genGraphics:
       new_obj = graph_MT_post__directLink_S(1021.0,401.0,self.obj30452)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("MT_post__directLink_S", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints 
    else: new_obj = None
    self.obj30452.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj30452)
    self.globalAndLocalPostcondition(self.obj30452, rootNode)
    self.obj30452.postAction( rootNode.CREATE )

    self.obj7702=MT_post__Female_S(self)
    self.obj7702.isGraphObjectVisual = True

    if(hasattr(self.obj7702, '_setHierarchicalLink')):
      self.obj7702._setHierarchicalLink(False)

    # MT_label__
    self.obj7702.MT_label__.setValue('3')

    # MT_pivotOut__
    self.obj7702.MT_pivotOut__.setValue('')
    self.obj7702.MT_pivotOut__.setNone()

    # MT_post__name
    self.obj7702.MT_post__name.setValue('\n#===============================================================================\n# You can access the value of the current node\'s attribute value by: attr_value.\n# If the current node shall be created you MUST initialize it here!\n# You can access a node labelled n by: PreNode(\'n\').\n# To access attribute x of node n, use: PreNode(\'n\')[\'x\'].\n# Note that the attribute values are those before the match is rewritten.\n# The order in which this code is executed depends on the label value\n# of the encapsulating node.\n# The given action must return the new value of the attribute.\n#===============================================================================\n\nreturn attr_value\n')
    self.obj7702.MT_post__name.setHeight(15)

    self.obj7702.graphClass_= graph_MT_post__Female_S
    if self.genGraphics:
       new_obj = graph_MT_post__Female_S(960.0,440.0,self.obj7702)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("MT_post__Female_S", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints 
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj7702.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj7702)
    self.globalAndLocalPostcondition(self.obj7702, rootNode)
    self.obj7702.postAction( rootNode.CREATE )

    self.obj127=MT_post__Station_S(self)
    self.obj127.isGraphObjectVisual = True

    if(hasattr(self.obj127, '_setHierarchicalLink')):
      self.obj127._setHierarchicalLink(False)

    # MT_label__
    self.obj127.MT_label__.setValue('1')

    # MT_pivotOut__
    self.obj127.MT_pivotOut__.setValue('station1')

    # MT_post__name
    self.obj127.MT_post__name.setValue('\n#===============================================================================\n# You can access the value of the current node\'s attribute value by: attr_value.\n# If the current node shall be created you MUST initialize it here!\n# You can access a node labelled n by: PreNode(\'n\').\n# To access attribute x of node n, use: PreNode(\'n\')[\'x\'].\n# Note that the attribute values are those before the match is rewritten.\n# The order in which this code is executed depends on the label value\n# of the encapsulating node.\n# The given action must return the new value of the attribute.\n#===============================================================================\n\nreturn attr_value\n')
    self.obj127.MT_post__name.setHeight(15)

    self.obj127.graphClass_= graph_MT_post__Station_S
    if self.genGraphics:
       new_obj = graph_MT_post__Station_S(960.0,280.0,self.obj127)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("MT_post__Station_S", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints 
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj127.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj127)
    self.globalAndLocalPostcondition(self.obj127, rootNode)
    self.obj127.postAction( rootNode.CREATE )

    self.obj15278=MT_post__Station_S(self)
    self.obj15278.isGraphObjectVisual = True

    if(hasattr(self.obj15278, '_setHierarchicalLink')):
      self.obj15278._setHierarchicalLink(False)

    # MT_label__
    self.obj15278.MT_label__.setValue('2')

    # MT_pivotOut__
    self.obj15278.MT_pivotOut__.setValue('station2')

    # MT_post__name
    self.obj15278.MT_post__name.setValue('\n#===============================================================================\n# You can access the value of the current node\'s attribute value by: attr_value.\n# If the current node shall be created you MUST initialize it here!\n# You can access a node labelled n by: PreNode(\'n\').\n# To access attribute x of node n, use: PreNode(\'n\')[\'x\'].\n# Note that the attribute values are those before the match is rewritten.\n# The order in which this code is executed depends on the label value\n# of the encapsulating node.\n# The given action must return the new value of the attribute.\n#===============================================================================\n\nreturn attr_value\n')
    self.obj15278.MT_post__name.setHeight(15)

    self.obj15278.graphClass_= graph_MT_post__Station_S
    if self.genGraphics:
       new_obj = graph_MT_post__Station_S(1140.0,280.0,self.obj15278)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("MT_post__Station_S", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints 
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj15278.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj15278)
    self.globalAndLocalPostcondition(self.obj15278, rootNode)
    self.obj15278.postAction( rootNode.CREATE )

    self.obj122=RHS(self)
    self.obj122.isGraphObjectVisual = True

    if(hasattr(self.obj122, '_setHierarchicalLink')):
      self.obj122._setHierarchicalLink(False)

    # action
    self.obj122.action.setValue('#===============================================================================\n# This code is executed after the rule has been applied.\n# You can access a node labelled n matched by this rule by: PostNode(\'n\').\n# To access attribute x of node n, use: PostNode(\'n\')[\'x\'].\n#===============================================================================\n\npass\n')
    self.obj122.action.setHeight(15)

    self.obj122.graphClass_= graph_RHS
    if self.genGraphics:
       new_obj = graph_RHS(820.0,180.0,self.obj122)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("RHS", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints 
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj122.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj122)
    self.globalAndLocalPostcondition(self.obj122, rootNode)
    self.obj122.postAction( rootNode.CREATE )

    self.obj121=LHS(self)
    self.obj121.isGraphObjectVisual = True

    if(hasattr(self.obj121, '_setHierarchicalLink')):
      self.obj121._setHierarchicalLink(False)

    # constraint
    self.obj121.constraint.setValue('#===============================================================================\n# This code is executed after the nodes in the LHS have been matched.\n# You can access a matched node labelled n by: PreNode(\'n\').\n# To access attribute x of node n, use: PreNode(\'n\')[\'x\'].\n# The given constraint must evaluate to a boolean expression:\n#    returning True enables the rule to be applied,\n#    returning False forbids the rule from being applied.\n#===============================================================================\n\nreturn True\n')
    self.obj121.constraint.setHeight(15)

    self.obj121.graphClass_= graph_LHS
    if self.genGraphics:
       new_obj = graph_LHS(340.0,180.0,self.obj121)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("LHS", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints 
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj121.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj121)
    self.globalAndLocalPostcondition(self.obj121, rootNode)
    self.obj121.postAction( rootNode.CREATE )

    # Connections for obj123 (graphObject_: Obj37) of type MT_pre__Station_S
    self.drawConnections(
 )
    # Connections for obj124 (graphObject_: Obj38) of type MT_pre__Station_S
    self.drawConnections(
(self.obj124,self.obj15306,[661.0, 321.0, 661.0, 401.0],"true", 2) )
    # Connections for obj125 (graphObject_: Obj39) of type MT_pre__Female_S
    self.drawConnections(
 )
    # Connections for obj15306 (graphObject_: Obj52) of type MT_pre__directLink_S
    self.drawConnections(
(self.obj15306,self.obj125,[661.0, 401.0, 661.0, 481.0],"true", 2) )
    # Connections for obj30452 (graphObject_: Obj57) of type MT_post__directLink_S
    self.drawConnections(
(self.obj30452,self.obj7702,[1021.0, 401.0, 1021.0, 481.0],"true", 2) )
    # Connections for obj7702 (graphObject_: Obj45) of type MT_post__Female_S
    self.drawConnections(
 )
    # Connections for obj127 (graphObject_: Obj41) of type MT_post__Station_S
    self.drawConnections(
(self.obj127,self.obj30452,[1021.0, 321.0, 1021.0, 401.0],"true", 2) )
    # Connections for obj15278 (graphObject_: Obj47) of type MT_post__Station_S
    self.drawConnections(
 )
    # Connections for obj122 (graphObject_: Obj36) of type RHS
    self.drawConnections(
 )
    # Connections for obj121 (graphObject_: Obj35) of type LHS
    self.drawConnections(
 )

newfunction = moveoneoutputlink_MDL

loadedMMName = ['MT_pre__SimpleDSLTrans_META', 'MT_post__SimpleDSLTrans_META', 'MoTifRule_META']

atom3version = '0.3'
